<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="/tp_bypal/Public/easyui/demo.css">
    <link rel="stylesheet" type="text/css" href="/tp_bypal/Public/css/form_table.css">
    <link rel="stylesheet" type="text/css" href="/tp_bypal/Public/js/jquery_validate/css/validationEngine.jquery.css" >
    <script type="text/javascript" src="/tp_bypal/Public/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/tp_bypal/Public/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/tp_bypal/Public/js/jquery_validate/js/jquery.validationEngine.js"></script>
    <script type="text/javascript" src="/tp_bypal/Public/js/admin/user/user_edit.js"></script>
</head>
<body>
<div class="easyui-panel" title="用户新增" style="width:100%;margin-left: auto;border: 0px">
    <div class="form-panel">
        <div  id="form-link">
            <div class="easyui-panel" style="padding:5px;border-width: 0px;border-bottom-width: 1px;">
                <a href="javscript:;" class="easyui-linkbutton" onclick="add_ajax_submit();" iconCls="icon-save" plain="true" style="width:80px">保存</a>
                <a href="javscript:;" class="easyui-linkbutton" onclick="reset();" iconCls="icon-reload" plain="true" style="width:80px">重置</a>
                <a href="javscript:;" class="easyui-linkbutton" onclick="close_tab();" iconCls="icon-undo" plain="true" style="width:80px">关闭</a>
            </div>
        </div>
        <div class="table_main">
            <form id="defaultForm" method="post" action="../../Admin/User/user_edit_ajax">
                <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                    <tr>
                        <th width="131">名称</th>
                        <th>内容</th>
                    </tr>
                    <tr>
                        <td align="right">商户名称</td>
                        <td>
                            <span id="fac_simple_name"><?php echo ($user_array["fac_simple_name"]); ?></span><input type="checkbox" onclick="show_fac(this);"/>（是否编辑商户）
                            <input type="hidden" name="fac_id" id="fac_id" value=""/>
                            <input type="hidden" name="fac_id_http" value="<?php echo ($user_array["fac_id"]); ?>"/>
                            <input type="hidden" name="user_id" id="user_id" value="<?php echo ($user_array["user_id"]); ?>"/>
                            <input type="hidden" id="main_url" value="<?php echo ($url); ?>">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">登录名</td>
                        <td>
                            <input type="text" name="load_name" id="load_name" value="<?php echo ($user_array["load_name"]); ?>" class="inpMain validate[required,maxSize[20],ajax[ajaxLoadName_edit]]" placeholder="请填写登录名"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">姓名</td>
                        <td>
                            <input type="text" name="user_name" id="user_name" value="<?php echo ($user_array["user_name"]); ?>" class="inpMain validate[required,custom[chinese]]" placeholder="请填写姓名"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">手机号码</td>
                        <td>
                            <input type="text" name="user_phone" id="user_phone" value="<?php echo ($user_array["user_phone"]); ?>" class="inpMain validate[required,custom[phone]]" placeholder="请填写手机号码"/>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">角色</td>
                        <td>
                            <select name="user_role" id="user_role" class="validate[required]">
                                <option value="">请选择</option>
                                <?php if(is_array($role_array)): foreach($role_array as $key=>$role): ?><option value="<?php echo ($role["role_id"]); ?>"><?php echo ($role["role_name"]); ?></option><?php endforeach; endif; ?>
                            </select>
                            <script>$("#user_role").find("option[value='<?php echo ($user_array["role_id"]); ?>']").attr("selected",true);</script>
                        </td>
                    </tr>
                    <tr style="display:none" id="sms_tr">
                        <td align="right">是否发送短信</td>
                        <td>
                            <input type="checkbox" name="send_message" value="1"/>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
        <br/><br/>
        <div id="fac_div">
            <div id="fac_table">

            </div>
            <div id="tb" style="display:none;padding:5px;height:auto">
                <div style="margin-bottom:5px">
                    <a href="javscript:;" onclick="fac_check_ok();" class="easyui-linkbutton" iconCls="icon-save" plain="true">确定</a>
                </div>
                <form id="searchForm" method="get" action="../../Admin/user/user_main">
                    <div>
                        商户简称: <input class="easyui-textbox" style="width:100px" name="fac_simpl_name" id="fac_name">
                        <a href="javascript:;" onclick="doSearch()" class="easyui-linkbutton" iconCls="icon-search">搜索</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/tp_bypal/Public/js/jquery_validate/js/jquery.validationEngine-zh_CN.js"></script>
<script>
    function submitForm(){
        $('#ff').form('submit');
    }
    function clearForm(){
        $('#ff').form('clear');
    }
</script>
</body>
</html>